﻿using System;
using System.Collections.Generic;
using System.Web;

namespace LRJ.Snipplr
{
    /// <summary>
    /// Summary description for Exceptions
    /// </summary>
    public class ArgumentEmptyException : ArgumentNullException
    {
        internal string _message = "A required Snipplr API Service argument is required";
        public override string Message
        {
            get
            {
                return _message;
            }
        
        }
        public ArgumentEmptyException() 
        {
            
        }
    }
    public class ApiKeyEmptyException : ArgumentEmptyException
    {
        public ApiKeyEmptyException()
        {
            _message = "Api Key is required";
        }
    }
    public class TitleEmptyException : ArgumentEmptyException
    {
        public TitleEmptyException()
        {
            _message = "Snippet title Key is required";
        }
    }
    public class CodeEmptyException : ArgumentEmptyException
    {
        public CodeEmptyException()
        {
            _message = "Snippet code is required";
        }
    }
    public class IdEmptyException : ArgumentEmptyException
    {
        public IdEmptyException()
        {
            _message = "Snippet ID is required";
        }
    }

    public class ServiceException : Exception
    {
        APIServiceStatusCode _status;
        public ServiceException(APIServiceStatusCode status, string message)
            : base(message)
        {
            _status = status;
        }
    }

    public class ApiKeyInvalidException : System.ServiceModel.AddressAccessDeniedException
    {
        public string ApiKeyEmptyException(){
            return this.Message;
        }
    }

}